package com.zzyl.nursing.job;

import com.zzyl.nursing.service.IMemberReservationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class ReservationJob {
    @Autowired
    private IMemberReservationService memberReservationService;

    @Scheduled(cron = "0 1/30 * * * ?")
    public void updateReservationJob() {
        memberReservationService.updateReservation();
        log.info("更新预约成功");
    }
}
